
using UnityEngine;
using System.Collections;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
 
public class OperateJson
{
    public static string GetJsonByPath(string pathUnderAssets)
    {
        if (!File.Exists(Application.dataPath + pathUnderAssets))
        {
            Debug.LogError("木有json文件存在这里");
            return null;
        }
 
        StreamReader sr = new StreamReader(Application.dataPath + pathUnderAssets);

        if (sr == null)
        {
            Debug.LogError("文件里木有东西");
            return null;
        }
        string json = sr.ReadToEnd();
 
        return json;
    
    }
}
